<script>
import { edit } from '@/mixins/system'
export default {
  name: 'WCat',
  mixins: [edit]
}
</script>

<template>
  <el-dialog
    append-to-body
    :close-on-click-modal="false"
    :before-close="close"
    :visible.sync="show"
    title="公众号模版消息"
    width="700px"
  >
    <div v-loading="loading" class="custom-dialog-body">
      <el-form
        v-if="form.id && loading === false"
        ref="form"
        :inline="true"
        :model="set"
        size="small"
        label-width="150px"
      >
        <el-form-item
          :rules="[{ required: true, message: '请输入开发者ID', trigger: 'blur' }]"
          label="开发者ID"
          prop="appid"
        >
          <el-input v-model="set.appid" placeholder="请输入开发者ID" style="width: 400px;" />
        </el-form-item>
        <el-form-item
          :rules="[{ required: true, message: '请输入开发者密码', trigger: 'blur' }]"
          label="开发者密码"
          prop="appSecret"
        >
          <el-input v-model="set.appSecret" placeholder="请输入开发者密码" style="width: 400px;" />
        </el-form-item>
        <el-form-item
          :rules="[{ required: true, message: '请输入模版编码', trigger: 'blur' }]"
          label="模版编码"
          prop="templateId"
        >
          <el-input v-model="set.templateId" placeholder="请输入模版编码" style="width: 400px;" />
        </el-form-item>
        <el-form-item
          :rules="[{ required: true, message: '请输入参数列表', trigger: 'blur' }]"
          label="参数列表"
          prop="params"
        >
          <el-input
            v-model="set.params"
            type="textarea"
            placeholder="参数请以[{ key: 参数名称,color: 字体颜色值},{ key: 参数名称,color: 字体颜色值}]输入"
            style="width: 400px;"
          />
        </el-form-item>
      </el-form>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button type="text" @click="close">取消</el-button>
      <el-button
        :loading="saveObj"
        type="primary"
        @click="submitCU"
      >保存</el-button>
    </div>
  </el-dialog>
</template>

<style scoped>

</style>
